package main

import "fmt"

func main() {
	a := 1
	b := 2
	test(&a, &b)
	fmt.Println(a, b)
}
// 地址传递
func test(a *int, b *int) {
	a, b = b, a
}
